package com.varian.system.dto;

import com.varian.system.vo.SysDeptTreeVO;
import com.varian.tool.tree.INode;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * @author ben
 * @since 2025/2/6
 */
@Data
public class SysDeptTreeItemDTO implements INode<SysDeptTreeItemDTO> {

    /**
     * 部门id
     */
    private Long id;
    /**
     * 上级部门id
     */
    private Long parentId;
    /**
     * 部门层级
     */
    private Integer deptLevel;
    /**
     * 部门右值
     */
    private Integer rightValue;
    /**
     * 部门左值
     */
    private Integer leftValue;
    /**
     * 子部门
     */
    private List<SysDeptTreeItemDTO> children;

    @Override
    public Comparable<?> weight() {
        return leftValue;
    }
}
